﻿using CK.Sprite.Framework;
using JetBrains.Annotations;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Security.Cryptography;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading.Tasks;

namespace CK.Sprite.Form.Core
{
    public class RuntimeAppService : AppService, IRuntimeAppService
    {
        public DictDbFrameworkCache DictDbFrameworkCache => LazyGetRequiredService(ref _dictDbFrameworkCache);
        private DictDbFrameworkCache _dictDbFrameworkCache;

        private readonly RuntimeService _runtimeService;
        public RuntimeAppService(RuntimeService runtimeService)
        {
            _runtimeService = runtimeService;
        }

        public async Task<JArray> DoRuntimeMethod(JObject paramObject)
        {
            return await _runtimeService.CallRuntimeMethod(paramObject);
        }
    }
}
